<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="csrf-token" content="{{ csrf_token() }}">
    <title>个人中心</title>
    <link rel="stylesheet" href="{{ url_for('static', filename='front/css/settings.css') }}">
    <link rel="stylesheet" href="{{ url_for('static', filename='front/css/all.min.css') }}">
    <link rel="stylesheet" href="{{ url_for('static', filename='sweetalert/sweetalert.css') }}">
    <script src="{{ url_for('static', filename='front/js/jquery-3.1.1.min.js') }}"></script>
    <script src="{{ url_for('static', filename='front/js/settings.js') }}"></script>
    <script src="{{ url_for('static', filename='front/js/csrf_ajax.js') }}"></script>
    <script src="{{ url_for('static', filename='sweetalert/sweetalert.min.js') }}"></script>
    <script src="{{ url_for('static', filename='sweetalert/xtalert.js') }}"></script>
    {% block head %}{% endblock %}

</head>
<body>
<!-- 左侧边栏 -->
<div class="sidebar">
    <div class="user-info">
        <img src="{{ url_for("media.get_avatar", filename = g.user.avatar) }}" alt="用户头像" class="user-avatar"
             id="user-avatar">
        <div class="user-name">{{ g.user.username }}</div>
    </div>

    <div class="menu">
        <a href="{{ url_for("front.person_info") }}" class="menu-item ">
            <i class="fas fa-user"></i> 账号信息
        </a>
        <a href="{{ url_for("front.set_count") }}" class="menu-item ">
            <i class="fas fa-cog"></i> 账号设置
        </a>
        <a href="{{ url_for("front.manage_post") }}" class="menu-item ">
            <i class="fas fa-edit"></i> 帖子管理
        </a>
        <a href="{{ url_for("front.liked_posts") }}" class="menu-item ">
            <i class="fas fa-heart"></i> 喜欢的帖子
        </a>
    </div>
</div>

<!-- 主内容区 -->
<div class="main-content">
    <div class="content-header">
        <h2>{{ page_title|default('个人中心') }}</h2>
    </div>

    <div class="content-body">
        {% block content %}
            <!-- 这里是具体内容，由各个子页面覆盖 -->
            <p>请从左侧菜单选择功能</p>
        {% endblock %}
    </div>
</div>
</body>
</html>